home *** CD-ROM | disk | FTP | other *** search
/ Magnum One / Magnum One (Mid-American Digital) (Disc Manufacturing).iso / d12 / v7n14.arc / FIG9.TXT < prev    next >
Encoding:
Text File  |  1988-08-06  |  336 b   |  16 lines

  1. #include<malloc.h>
  2.  
  3.     char **ptr;
  4.  
  5.     .
  6.     .
  7.             /* set pointer to allocated space for 100 chars    */
  8.     if(!(ptr = (char **)malloc(100)))
  9.         return ERROR;
  10.     .
  11.     .
  12.     .
  13.             /* reallocate pointer space    for 200 chars    */
  14.     if(!(ptr = (char **)realloc(ptr,200)))
  15.         return ERROR;
  16.